package cn.edu.sjtu.se.dslab.dao.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import cn.edu.sjtu.se.dslab.component.design.DesignPatternInstance;
import cn.edu.sjtu.se.dslab.dao.IBaseDao;
import cn.edu.sjtu.se.dslab.dao.IDesignPatternInstanceDao;

/**
 * 
 * @author longshaohang
 * 
 */
@Repository("designPatternInstanceDao")
public class DesignPatternInstanceDaoImpl implements IDesignPatternInstanceDao {

	@Resource(name = "baseDao")
	private IBaseDao<DesignPatternInstance> baseDao;

	@Override
	public void save(DesignPatternInstance instance) {
		baseDao.save(instance);
	}

	@Override
	public DesignPatternInstance update(DesignPatternInstance instance) {
		return baseDao.update(instance);
	}

	@Override
	public DesignPatternInstance queryById(long id) {
		return baseDao.queryById(DesignPatternInstance.class, id);
	}

	@Override
	public List<DesignPatternInstance> queryByList() {
		return baseDao.queryList("DesignPatternInstance");
	}

}
